

/*The CustomEvent interface is the recommended interface for application-specific 
 event types. Unlike the Event interface, it allows applications to provide 
 contextual information about the event type*/
namespace("w3c.CustomEvent", {
	'@inherits' : w3c.Event,
	
	initialize : function(type, bubbles, cancelable, detail){
		if(!type) {
			throw new Error(this.namespace + "#initEvent(type, bubbles, cancelable, detail)\
			expected a valid event 'type' argument.")
		};
		
		this.type 		= type;
		this.bubbles 	= (typeof bubbles 	 !== "undefined") ? bubbles:true;
		this.cancelable	= (typeof cancelable !== "undefined") ? cancelable:true;
		this.detail 	= (typeof detail 	 !== "undefined") ? detail:{};
		this.timeStamp  = new Date().getTime();
	}
});